
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type PageLinkRequest struct {

	CateId string `json:"cate_id" form:"cate_id"`

	Type string `json:"type" form:"type"`

	Name string `json:"name" form:"name"`

	Url string `json:"url" form:"url"`

	Param string `json:"param" form:"param"`

	Example string `json:"example" form:"example"`

	Status string `json:"status" form:"status"`

	Sort string `json:"sort" form:"sort"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *PageLinkRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *PageLinkRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"cate_id": "required",

		"type": "required",

		"name": "required",

		"url": "required",

		"param": "required",

		"example": "required",

		"status": "required",

		"sort": "required",

		"add_time": "required",

	}
}

func (r *PageLinkRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *PageLinkRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *PageLinkRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
